package x.y.service;

import org.apache.log4j.Logger;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;

@Transactional
public class OtherFooService implements FooService {

	  private static Logger logger = Logger.getLogger(OtherFooService.class);
	
	  public Foo getFoo(String fooName) {
		  logger.debug("getFoo执行参数："+fooName);
//		  throw new UnsupportedOperationException();
		  getFoo("哈哈","哈哈");
		  return null;
	  }

	@Transactional(propagation=Propagation.MANDATORY)
	  public Foo getFoo(String fooName, String barName) {
		  logger.debug("getFoo执行参数："+ fooName + " and " + barName);
		  return null;
	  }

	  public void insertFoo(Foo foo) {
	    throw new UnsupportedOperationException();
	  }

	  public void updateFoo(Foo foo) {
	    throw new UnsupportedOperationException();
	  }

}
